<?php
$featured_products_query = "select p.products_id, p.products_image, pd.products_name,
                                   p.products_price
                           		   from (" . TABLE_PRODUCTS . " p
                           		   left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
                           		   left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                                   where p.products_id = f.products_id
                                   and p.products_id = pd.products_id
                                   and p.products_status = 1
                                   and f.status = 1
                                   and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
								   order by featured_date_added DESC limit 0,1";
$featured_products_sellers = $db->Execute($featured_products_query);
if ($featured_products_sellers->RecordCount() ==1) {
	$module_sideboxes_primary_procuct['id'] = $featured_products_sellers->fields['products_id'];
	$module_sideboxes_primary_procuct['name']  = $featured_products_sellers->fields['products_name'];
	$module_sideboxes_primary_procuct['image']  = $featured_products_sellers->fields['products_image'];
	$module_sideboxes_primary_procuct['price']  = $featured_products_sellers->fields['products_price'];	
	require($template->get_template_dir('tpl_module_sideboxes_primary_product_header.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_module_sideboxes_primary_product_header.php');
}